/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.account.accesscontrol.RightCommand;
/*    */ import com.zimbra.cs.account.accesscontrol.RightModifier;
/*    */ import com.zimbra.soap.JaxbUtil;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import com.zimbra.soap.admin.message.RevokeRightRequest;
/*    */ import com.zimbra.soap.admin.type.RightModifierInfo;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class RevokeRight
/*    */   extends RightDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 37 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/*    */     
/* 39 */     RevokeRightRequest rrReq = (RevokeRightRequest)JaxbUtil.elementToJaxb(request);
/* 40 */     RightModifier rightModifier = GrantRight.getRightModifier(rrReq.getRight());
/*    */     
/*    */ 
/*    */ 
/* 44 */     RightCommand.revokeRight(Provisioning.getInstance(), getAuthenticatedAccount(zsc), rrReq.getTarget(), rrReq.getGrantee(), rrReq.getRight().getValue(), rightModifier);
/*    */     
/*    */ 
/* 47 */     Element response = zsc.createElement(AdminConstants.REVOKE_RIGHT_RESPONSE);
/* 48 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 53 */     notes.add("Grantor must have the same or more rights on the same target or on a larger target set.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/RevokeRight.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */